﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Public;
using DAL;

namespace BLL
{
    public class NhanKhauBLL
    {
        public static List<NhanKhauPublic> LoadNhanKhauByMaSHK(int MaSHK)
        {
            return NhanKhauDAL.LoadNhanKhauByMaSHK(MaSHK);
        }
        public static void InsertNhanKhau(NhanKhauPublic nk)
        {
            NhanKhauDAL.InsertNhanKhau(nk);
        }
        public static void InsertNhanKhauKS(NhanKhauPublic nk)
        {
            NhanKhauDAL.InsertNhanKhauKS(nk);
        }
        public static int LoadMaNK()
        {
            return NhanKhauDAL.LoadMaNK();
        }
        public static void UpdateKhaiTu(int MaKT, int MaNK)
        {
            // chèn MaCT vào row có MaNK ????
            NhanKhauDAL.UpdateKhaiTu(MaKT, MaNK);
        }
        public static void UpdateMaSHK(int MaSHK, int MaNK)
        {
            NhanKhauDAL.UpdateMaSHK(MaSHK, MaNK);
        }
        public static NhanKhauPublic LoadNhanKhauByMaNK(int MaNK)
        {
            return NhanKhauDAL.LoadNhanKhauByMaNK(MaNK);
        }
        public static NhanKhauPublic LoadNhanKhauByCMND(string CMND)
        {
            return NhanKhauDAL.LoadNhanKhauByCMND(CMND);
        }
        public static int CountNhanKhau()
        {
            return NhanKhauDAL.CountNhanKhau();
        }
        public static int CountNhanKhauNam()
        {
            return NhanKhauDAL.CountNhanKhauNam();
        }
        public static int CountNhanKhauNu()
        {
            return NhanKhauDAL.CountNhanKhauNu();
        }
        public static void UpdateQuanHe(int MaNK, byte MaQH)
        {
            NhanKhauDAL.UpdateQuanHe(MaNK, MaQH);
        }
        public static List<NhanKhauPublic> LoadNhanKhauByMaSHKCha(int MaSHK)
        {
            return NhanKhauDAL.LoadNhanKhauByMaSHKCha(MaSHK);
        }
        public static List<NhanKhauPublic> LoadNhanKhauByMaSHKMe(int MaSHK)
        {
            return NhanKhauDAL.LoadNhanKhauByMaSHKMe(MaSHK);
        }
        public static NhanKhauPublic LoadNhanKhauByMaKS(int MaKS)
        {
            return NhanKhauDAL.LoadNhanKhauByMaKS(MaKS);
        }
        public static void UpdateMaKS(int MaKS, int MaNK)
        {
            NhanKhauDAL.UpdateMaKS(MaKS, MaNK);
        }
        public static List<NhanKhauPublic> LoadNhanKhauKS()
        {
            return NhanKhauDAL.LoadNhanKhauKS();
        }
        public static List<NhanKhauPublic> LoadListNhanKhauByMaKS(int MaKS)
        {
            return NhanKhauDAL.LoadListNhanKhauByMaKS(MaKS);
        }
        public static void UpdateNhanKhauKS(string HoTen, DateTime NgaySinh, int NoiSinh, byte DanToc, byte QuocTich, bool GioiTinh, string QueQuan, int MaKS)
        {
            NhanKhauDAL.UpdateNhanKhauKS(HoTen, NgaySinh, NoiSinh, DanToc, QuocTich, GioiTinh, QueQuan, MaKS);
        }
        public static List<NhanKhauPublic> LoadNhanKhauKT()
        {
            return NhanKhauDAL.LoadNhanKhauKT();
        }
        public static List<NhanKhauPublic> LoadListNhanKhauByMaKT(int MaKT)
        {
            return NhanKhauDAL.LoadListNhanKhauByMaKT(MaKT);
        }
        public static void DeleteNhanKhau(int MaNK)
        {
            NhanKhauDAL.DeleteNhanKhau(MaNK);
        }
        public static void UpdateNhanKhau(string HoTen, bool GioiTinh, int NoiSinh, DateTime NgaySinh, byte DanToc, byte QuocTich, byte TonGiao, byte TrinhDo, string NgheNghiep, string QueQuan, int MaQH, string CMND, string TenGoiKhac, int MaNK)
        {
            NhanKhauDAL.UpdateNhanKhau(HoTen, GioiTinh, NoiSinh, NgaySinh, DanToc, QuocTich, TonGiao, TrinhDo, NgheNghiep, QueQuan, MaQH, CMND, TenGoiKhac, MaNK);
        }
        public static int CountNK14()
        {
            return NhanKhauDAL.CountNK14();
        }
        public static int CountNKByDay(DateTime batdau, DateTime ketthuc)
        {
            return NhanKhauDAL.CountNKByDay(batdau,ketthuc);
        }
        public static int CountNKNuByDay(DateTime batdau, DateTime ketthuc)
        {
            return NhanKhauDAL.CountNKNuByDay(batdau, ketthuc);
        }
        public static int CountNK14ByDay(DateTime batdau, DateTime ketthuc)
        {
            return NhanKhauDAL.CountNK14ByDay(batdau, ketthuc);
        }
        public static int CountNKDeleteByDay(DateTime batdau, DateTime ketthuc)
        {
            return NhanKhauDAL.CountNKDeleteByDay(batdau, ketthuc);
        }
        public static int CountNKDieByDay(DateTime batdau, DateTime ketthuc)
        {
            return NhanKhauDAL.CountNKDieByDay(batdau, ketthuc);
        }
        public static int CountNKChuyenDiByDay(DateTime batdau, DateTime ketthuc)
        {
            return NhanKhauDAL.CountNKChuyenDiByDay(batdau, ketthuc);
        }
        public static int CountNKTuyenDungByDay(DateTime batdau, DateTime ketthuc)
        {
            return NhanKhauDAL.CountNKTuyenDungByDay(batdau, ketthuc);
        }
        public static int CountNKDiNuocNgoaiByDay(DateTime batdau, DateTime ketthuc)
        {
            return NhanKhauDAL.CountNKDiNuocNgoaiByDay(batdau, ketthuc);
        }
        public static int CountNKHuyDKByDay(DateTime batdau, DateTime ketthuc)
        {
            return NhanKhauDAL.CountNKHuyDKByDay(batdau, ketthuc);
        }
        public static int CountNKKhaiSinhByDay(DateTime batdau, DateTime ketthuc)
        {
            return NhanKhauDAL.CountNKKhaiSinhByDay(batdau, ketthuc);
        }
        public static int CountNKChuyenDenByDay(DateTime batdau, DateTime ketthuc)
        {
            return NhanKhauDAL.CountNKChuyenDenByDay(batdau, ketthuc);
        }
        public static int CountNKNuocNgoaiVeByDay(DateTime batdau, DateTime ketthuc)
        {
            return NhanKhauDAL.CountNKNuocNgoaiVeByDay(batdau, ketthuc);
        }
        public static void UpdateNgayXoa(int MaNK, DateTime NgayXoa, byte LyDoXoa)
        {
            NhanKhauDAL.UpdateNgayXoa(MaNK,NgayXoa,LyDoXoa);
        }
        public static void UpdateNgayXoaByMaSHK(int MaSHK, DateTime NgayXoa, byte LyDoXoa)
        {
            NhanKhauDAL.UpdateNgayXoaByMaSHK(MaSHK, NgayXoa, LyDoXoa);
        }
        public static List<NhanKhauPublic> NVQS()
        {
            return NhanKhauDAL.NVQS();
        }
        public static void UpdateChuHo(int MaNK, string ChuHo)
        {
            NhanKhauDAL.UpdateChuHo(MaNK, ChuHo);
        }
        public static List<NhanKhauPublic> TimKiemTen(string HoTen)
        {
            return NhanKhauDAL.TimKiemTen(HoTen);
        }
        public static void UpdateTinhTrang(int MaNK, byte TinhTrang)
        {
            NhanKhauDAL.UpdateTinhTrang(MaNK, TinhTrang);
        }
        public static bool TimChuHo(string TenServer, string TenData, string HoTen)
        {
            return NhanKhauDAL.TimChuHo(TenServer, TenData, HoTen);
        }
        public static NhanKhauPublic TimNhanKhau(int MaNK, string server, string data)
        {
            return NhanKhauDAL.TimNhanKhau(MaNK, server, data);
        }
    }
}
